jQuery(function ($) {
    
        var swiper = new Swiper('.sec_top', {
            pagination: '.swiper-pagination',
            autoHeight: true,
            spaceBetween: 30,
            onSlideChangeStart: function (swiper) {
                $('.lis').eq(swiper.activeIndex).addClass('nav_li').siblings().removeClass('nav_li');
            }
    
        });
        $('.lis').click(function () {
            $(this).addClass('nav_li').siblings().removeClass('nav_li');
            swiper.slideTo($(this).index(), 1000);
            if($("nav_li").lenght ==0){
                $(".btn").css("opacity","0");
            }
        })
    
    });
    var swiper1 = new Swiper('.swipers .swiper-container', {
        paginationClickable: true,
        autoplay: 2500,
        autoplayDisableOnInteraction: false
    });
    
      var swiper2 = new Swiper('.lun_sw .swiper-container', {
      slidesPerView: 3,
      spaceBetween: 30
    });
      $.ajax({
        type: "get",
        url: "../json/haojia.json",
        dataType: 'json',
        success: function (data) {
            var str = template("tem", {
                list: data
            });
    
            $('.big').html(str);
    
        }
    });
    $.ajax({
        type: "get",
        url: "../json/hao.json",
        dataType: 'json',
        success: function (data) {
            var str = template("tems", {
                li: data
            });
    
            $('.swiper2').html(str);
    
        }
    });